<?php
/*
 * Created on Oct 11, 2007
 *
 * Continut:  
 * 
 */
 require_once("xmlChapter.class.php");
 require_once("xmlBasicElements.class.php");
 require_once("xmlSubChapter.class.php");
 require_once("xmlSection.class.php");
 require_once("xmlDocument.class.php");
	
 $dummy=0;
 $dom=new xmlDocument('docXml.xml','..//xmlDocument/','docSkeleton.dtd',&$dummy);
// try{
// 	echo '---newChapTest----<br />';
 	$ch1=$dom->createNewChapter('cap1','c1');
/* 	echo '---EndNewChapTest----<br />';
 }catch(exception $e){
 	echo $e->getmessage();
 }	*/
 //var_dump($dom->docElements["c1"]);
// echo '--------><--------<br />';
 $ch2=$dom->createNewChapter('cap2','c2');
 $ch1->createNewQuote('q1','Astai un citat mahh bimbalaule, asa ca baga la cap: CITAT');
 $ch2->createNewNote('ch2note1','prima nota a capitolului 2');
 $ch1->createNewAttention('ch1att1','atentionarea nr1 din capitolul 1');
 
 /*
 try{
 	$doc=new xmlChapter("testXmlChap.xml", "cap1", "..//xmlDocument/");
 }catch(exception $e){
 	echo $e->getmessage();
 }
 
 try{
 	$doc->createNewParagraph('para1','text para1');
 }catch(exception $e){
 	echo $e->getmessage();
 }
 
 try{
 	$doc->createNewImage('img1','..//xmlDocument/img/img1.png');
 }catch(exception $e){
 	echo $e->getmessage();
 }
 
 $tableContent=array(array('r1c1','r1c2','r1c3'), array('r2c1','r2c2','r2c3'), array('r3c1','r3c2','r3c3'));
 $tableHeader=array('coloana1','coloana2','coloana3');
 $doc->createNewTable('tbl1', $tableContent, $tableHeader, 'Tabelul 1');

 $listContent=array('element1','element2','element3');
 $doc->createNewList('list1',$listContent);
 
 $note='acesta este continutul primei note:)';
 $doc->createNewNote('nota1',$note);
 
 $att='acesta este continutul primei atentionari:(';
 $doc->createNewAttention('att1',$att);
 
 $qt='acesta este continutul primului citat :))';
 $doc->createNewQuote('qt1',$qt);
 
 $subC1=$doc->createNewSubChapter("subChap1", "subcapitolul 1");
 try{
 	$subC1->createNewParagraph('subChap1Para1','subcpaitol 1 paragraf 1');
 }catch(exception $e){
 	echo $e->getmessage();
 }
 $doc->createNewSubChapter("subChap2", "subcapitolul 2");
 $doc->chapterElements['subChap2']->createNewParagraph('subChap2Para1','subcpaitol 2 paragraf 1'); 
 
 try{
 	//echo '===base===<br />';
 	$sect1=$doc->createNewSection('sect1','sectiunea nr 1');
 	//echo '===base end===<br />';
 }catch(exception $e){
 	echo $e->getmessage();
 }
 $sect1->createNewParagraph('sect1para1','sectiunea 1 paragraful 1');
 $subC1->createNewSection('sectIn','sectiune interioara');
 */
?>
